sql_dict = {}

sql_dict['本科'] = f'''
                select 
                a.c_zyh as 住院号,
                b.管床医生,
                a.c_name as 姓名,
                c.c_sex_desc as 性别,
                c.c_age_str as 年龄,
                case when a.c_bed like '%床' then a.c_bed else concat(substring(a.c_bed,2,2),'床') end as 床号,
                c.c_ry_zd as 诊断,
                a.kyye as 报销费用,
                case datediff(now(),a.c_ry_date)
                when 0 then '新入'
                when 1 then '昨入'
                else  datediff(now(),a.c_ry_date) end as 天数
                from patient_zyhs a
                left join assistant_doctor b on a.c_zyh=b.住院号
                left join patient_details c on a.c_zyh=c.c_zyh
                where a.c_out_date is null
                order by 床号
            '''

